<?php require_once './connection.php';?>
<html>
    <link href="style.css" rel="stylesheet" type="text/css"/>
    <?php 
    $sql = 'SELECT * FROM students';
    $students=  query($sql);
    ?>
    <h1>TABLE STUDENTS</h1>
        <?php foreach($students as $stu):?>
            <table class="table_1">
                <tr>
                    <td width="100"><?php echo $stu['id']?></td>
                    <td width="300"><?php echo $stu['name']?></td>
                </tr>

            </table>
        <?php    endforeach;?>
    <br/>
    <div class="form">
    <form>
        <h4>NHAP THONG TIN SINH VIEN</h4>
        ID: <input type="text" name="id"/>
        NAME: <input type="text" name="name"/>
        <input type="submit" name="insert" value="nhap"/>
        <input type="reset" name="reset" value="xoa"/>
    </form>
    </div>
    <?php
    $sql = 'SELECT*FROM staffs';
    $staffs=  query($sql);
    ?>
    <h1>TABLE STAFFS</h1>
    <?php    foreach ($staffs as $sta):?> 
    <table class="table_1">
        <tr>
            <td width="100"><?php echo $sta['id']?></td>
            <td width="300"><?php echo $sta['name']?></td>
        </tr>
    </table>
    <?php    endforeach;?>

    <br/>
    <div class="form">
    <form>
        <h4>NHAP THONG TIN NHAN VIEN</h4>
        ID: <input type="text" name="id"/>
        NAME: <input type="text" name="name"/>
        <input type="submit" name="insert" value="nhap"/>
        <input type="reset" name="reset" value="xoa"/>
    </form>
    </div>

    
</html>
